﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace WHT_Auth {
    public partial class LogoutAtQuit : Form {

        private WHO_Auth_TNG_Win.Auth auth;

        public LogoutAtQuit(WHO_Auth_TNG_Win.Auth auth) {
            this.auth = auth;
            InitializeComponent();
        }

       
        private void buttonStayLoggedIn_Click(object sender, EventArgs e) {
            if (checkRemember.Checked)
                WHT_Auth.Properties.Settings.Default.quitAction = 1;
            WHT_Auth.Properties.Settings.Default.Save();
            Close();
        }


        private void buttonLogout_Click(object sender, EventArgs e) {
            auth.doLogout();
            WHT_Auth.Properties.Settings.Default.quitAction = 2;
            WHT_Auth.Properties.Settings.Default.Save();
            Close();
        }

        private void LogoutAtQuit_Load(object sender, EventArgs e) {

        }

    }
}
